from enum import Enum


# 5种断言方式
class AssertType(Enum):
    JSON_FULL_TEXT = '检查点-json全文'
    GTE_AMOUNT = '检查点-数据条数大于等于'
    EQUAL_AMOUNT = '检查点-数据条数等于'
    CONTAIN_FIELDS = '检查点-包含指定字段的值'
    EQUAL_FIELD = '检查点-等于指定字段的值'


# 常见的4中请求类型
class RequestType(Enum):
    PATH_PARAMS = 'path_params'
    FORM = 'form'
    JSON = 'json'
    FILE = 'file'


# 接口信息
class ApiInfo(Enum):
    DESCRIBE = 'describe'
    URL = 'url'
    METHOD = 'method'
    REQUEST_TYPE = 'request_type'
    HEADERS = 'headers'
    TIMESTAMP = 'timestamp'
    CONTENT_TYPE = 'Content-Type'
    TEST_DATA_FILE_PATH = 'testDataFilePath'
    ASSERT_INFO = 'assert_info'
    JSON_FULL_TEXT_IGNORE_FIELD = 'json_full_text_ignore_field'
    LIST_JSON_PATH = 'list_json_path'
    CONTAIN_FIELDS_JSON_PATH = 'contain_fields_json_path'
    EQUAL_FIELD_JSON_PATH = 'equal_field_json_path'
    HOST = 'host'
    COOKIE = 'cookie'


# excel表头字段
class ExcelHead(Enum):
    ID = '序号'
    SKIP = 'skip'
    REQUEST_PARAMS = '请求参数'
    UPLOAD_FILE = '上传文件'
    CHECK_POINT = '检查点'


# 上传文件接口，需要在excel中填写的两个字段
class UploadApiField(Enum):
    FILE_PATH = '上传文件-filePath'
    PARAMS_TYPE = '上传文件-paramsType'


# 上传文件接口传递参数的类型
class ParamsType(Enum):
    PATH_PARAMS = 'path_params'
    FORM = 'form'

